import { createRouter, createWebHashHistory } from 'vue-router'

//导入自定义的页面
import IndexVue from '@/views/Index.vue'
import page1 from "@/views/Page1.vue";
import page2 from "@/views/page2.vue";
const routes = [
    {
        path: '/',//路径/代表首页
        name: 'index',//名称
        component: IndexVue,//组建
        children:[{
            path: '/page1',
            name: 'page1',
            component:page1
        },
            {
                path: '/page2',
                name:'/page2',
                component: page2
            }]
    },
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router
